home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / boot / decprom / fsIndex.h < prev    next >
C/C++ Source or Header  |  1990-02-16  |  1KB  |  40 lines

  1. /*
  2.  * fsIndex.h --
  3.  *
  4.  *    Definitions to allow moving through indirect blocks.
  5.  *
  6.  * Copyright (C) 1985 Regents of the University of California
  7.  * All rights reserved.
  8.  *
  9.  *
  10.  * $Header: /sprite/src/boot/decprom/RCS/fsIndex.h,v 1.1 90/02/16 16:14:25 shirriff Exp $ SPRITE (Berkeley)
  11.  */
  12.  
  13. #ifndef _FSINDEX
  14. #define _FSINDEX
  15.  
  16. /*
  17.  * Index type constants.
  18.  */
  19. #ifndef FS_INDIRECT
  20. #define    FS_INDIRECT    0
  21. #define    FS_DBL_INDIRECT    1
  22. #define    FS_DIRECT    2
  23. #endif
  24.  
  25. typedef struct BlockIndexInfo {
  26.     int         indexType;        /* Whether chasing direct, indirect,
  27.                        or doubly indirect blocks. */
  28.     int         blockNum;        /* Block that is being read, written,
  29.                        or allocated. */
  30.     int         *blockAddrPtr;        /* Pointer to block pointer. */
  31.     int         firstIndex;        /* An index into either the direct
  32.                        block pointers or into an 
  33.                        indirect block. */
  34.     int         secondIndex;        /* An index into a doubly indirect
  35.                        block. */
  36.     Boolean      firstBlockNil;        /* The first block is empty. */
  37. } BlockIndexInfo;
  38.  
  39. #endif _FSINDEX
  40.